package com.harmontronics.hanma.paas.paas.config;

import com.harmontronics.hanma.paas.paas.domain.app.service.ProcessImportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;
import java.io.IOException;

@Configuration
@ConditionalOnMissingClass("com.harmontronics.hanma.paas.paas.interceptor.TokenValidInterceptor")
public class BusinessInitConfig {

    @Autowired
    private ProcessImportService processImportService;

    @PostConstruct
    public void importProcess() throws IOException {
        System.out.println("importProcess begin");
        processImportService.importProcess();
        System.out.println("importProcess end");
    }
}
